<?php
/**
 * Controller is the customized base controller class.
 * All controller classes for this application should extend from this base class.
 */
class Controller extends CController
{
	/**
	 * @var string the default layout for the controller view. Defaults to '//layouts/column1',
	 * meaning using a single column layout. See 'protected/views/layouts/column1.php'.
	 */
	public $layout='//layouts/column1';
	/**
	 * @var array context menu items. This property will be assigned to {@link CMenu::items}.
	 */
	public $menu=array();
	/**
	 * @var array the breadcrumbs of the current page. The value of this property will
	 * be assigned to {@link CBreadcrumbs::links}. Please refer to {@link CBreadcrumbs::links}
	 * for more details on how to specify this property.
	 */
	public $breadcrumbs=array();
        
        public function registrar_scrips(){
            $baseUrl = Yii::app()->baseUrl;
            $cs = Yii::app()->getClientScript();
            $cs->registerCssFile($baseUrl . '/js/chosen/chosen.css');
            $cs->registerScriptFile($baseUrl . '/js/chosen/chosen.jquery.min.js');
            $cs->registerScriptFile($baseUrl . '/js/jquery.meio.mask.min.js');
            $cs->registerScriptFile($baseUrl . '/js/jquery.metadata.js');
            $cs->registerScriptFile($baseUrl . '/js/jquery.validate.min.js');
            $cs->registerScriptFile($baseUrl . '/js/egresados_forms.js');
            $cs->registerCssFile($baseUrl . '/css/egresados_forms.css');
            $cs->registerScriptFile($baseUrl . '/js/jquery.scrollTo.js');
            $cs->registerCssFile($baseUrl . '/css/prettyPhoto.css');
            $cs->registerCssFile($baseUrl . '/css/menu.css');
            $cs->registerScriptFile($baseUrl . '/js/jquery.prettyPhoto.js');
        }
        
        public function registrar_scrips_jquery(){
            $baseUrl = Yii::app()->baseUrl;
            $cs = Yii::app()->getClientScript();
            $cs->registerCssFile($baseUrl . '/css/smoothness/jquery-ui-1.8.10.custom.css');
            $cs->registerScriptFile($baseUrl . '/js/jquery-ui-1.8.16.custom.min.js');
        }
        public function registrar_scrips_jquery_oly(){
            $baseUrl = Yii::app()->baseUrl;
            $cs = Yii::app()->getClientScript();
            $cs->registerScriptFile($baseUrl . '/assets/d7ae9def/jquery.js');
        }
        public function registrar_scrips_tinymce(){
            $baseUrl = Yii::app()->baseUrl;
            $cs = Yii::app()->getClientScript();
            $cs->registerScriptFile($baseUrl . '/js/tiny_mce/tiny_mce.js');
        }
        public function registrar_scrips_timepicker(){
            $baseUrl = Yii::app()->baseUrl;
            $cs = Yii::app()->getClientScript();
            $cs->registerScriptFile($baseUrl . '/js/jquery-ui-timepicker-addon.js');
        }
        public function registrar_scrips_base_yii(){
            $baseUrl = Yii::app()->baseUrl;
            $cs = Yii::app()->getClientScript();
            $cs->registerCssFile($baseUrl . '/css/main.css');
            $cs->registerCssFile($baseUrl . '/css/screen.css');
            $cs->registerCssFile($baseUrl . '/css/form.css');
        }
        public function registrar_scrips_jqgrid(){
            $baseUrl = Yii::app()->baseUrl;
            $cs = Yii::app()->getClientScript();
            $cs->registerCssFile($baseUrl . "/css/ui.jqgrid.css");
            $cs->registerScriptFile($baseUrl . "/js/i18n/grid.locale-es.js");
            $cs->registerScriptFile($baseUrl . "/js/jquery.jqGrid.min.js");
        }
        
        public function msgbox($msg,$title=""){
              $cs = Yii::app()->getClientScript();
              $cs->registerScript(
                  'Msgbox','$(function() { Alert_Ui("'.$title.'","'.$msg.'"); });',
                  CClientScript::POS_END
              );
        }
}